using Volo.Abp;
using Volo.Abp.Modularity;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.Domain;
using Volo.Abp.AutoMapper;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Settings;
using Volo.Abp.Caching;
using Volo.Abp.EventBus;
using Microsoft.Extensions.DependencyInjection;
using Matrix.Configuration.Services;
using Matrix.Configuration.Events;

namespace Matrix.Configuration
{
    [DependsOn(
        typeof(MatrixConfigurationDomainSharedModule),
        typeof(AbpDddDomainModule),
        typeof(AbpAutoMapperModule),
        typeof(AbpBackgroundWorkersModule),
        typeof(AbpMultiTenancyModule),
        typeof(AbpSettingsModule),
        typeof(AbpCachingModule),
        typeof(AbpEventBusModule)
    )]
    public class MatrixConfigurationDomainModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var services = context.Services;

            // Register domain services
            Configure<AbpMultiTenancyOptions>(options =>
            {
                options.IsEnabled = true;
            });

            // Configure settings
            // 基础设置配置 - 暂时简化，等待设置定义提供程序实现
            // Configure<AbpSettingsOptions>(options => { });
        }
    }
}